CREATE TABLE [dbo].[DnnProduct_SearchItem]
(
[SearchItemID] [int] NOT NULL IDENTITY(1, 1),
[Title] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [nvarchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Author] [int] NULL,
[PubDate] [datetime] NOT NULL,
[ModuleId] [int] NOT NULL,
[SearchKey] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Guid] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[HitCount] [int] NULL,
[ImageFileId] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_SearchItem] ADD CONSTRAINT [PK_DnnProduct_SearchItem] PRIMARY KEY CLUSTERED  ([SearchItemID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DnnProduct_SearchItem] ON [dbo].[DnnProduct_SearchItem] ([ModuleId], [SearchKey]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_SearchItem] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_SearchItem_DnnProduct_Modules] FOREIGN KEY ([ModuleId]) REFERENCES [dbo].[DnnProduct_Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION
GO
